﻿using IconYuan.Model.DB;
using IconYuan.Model.DTO.Markets;
using IconYuan.Model.Entity.Products;
using IconYuan.Model.Products;

namespace IconYuan.Model.DTO.Products
{
    /// <summary>
    /// 商品列表dto
    /// </summary>
    public class GoodsListDto
    {  
        public PageList<GoodsBaseDto> list { get; set; }
    }

    /// <summary>
    /// 所有商品dto
    /// </summary>
    public class AllGoodsDto
    {
        public List<Cate> cate_list { get; set; }
        public List<GoodsBaseDto> list { get; set; }
    }
    /// <summary>
    /// 商品基础信息
    /// </summary>
    public class GoodsBaseDto
    {
        /// <summary>
        /// 自增
        /// </summary>
        public int goods_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goods_name { get; set; }
        /// <summary>
        /// 分类id
        /// </summary>
        public int category_id { get; set; }
        /// <summary>
        /// 商品规格 (10单规格 20多规格)
        /// </summary>
        public int spec_type { get; set; }
        /// <summary>
        /// 商品价格 (最低)
        /// </summary>
        public decimal goods_price_min { get; set; }
        /// <summary>
        /// 划线价格 (最低)
        /// </summary>
        public decimal line_price_min { get; set; }
        /// <summary>
        /// 促销价(首单价)
        /// </summary>
        public decimal sale_price { get; set; }
        /// <summary>
        /// 库存总量 (包含所有sku)
        /// </summary>
        public int stock_total { get; set; }
        /// <summary>
        /// 需要兑换的积分
        /// </summary>
        public int points { get; set; }
        /// <summary>
        /// 商品卖点
        /// </summary>
        public string selling_point { get; set; }
        /// <summary>
        /// 商品主图url
        /// </summary>
        public string goods_image { get; set; } = string.Empty;
        /// <summary>
        /// 初始销量
        /// </summary>
        public int sales_initial { get; set; } = 0;
        /// <summary>
        /// 实际销量
        /// </summary>
        public int sales_actual { get; set; } = 0;
        /// <summary>
        /// 门店id
        /// </summary>
        public int shop_id { get; set; } = 0;
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
        /// <summary>
        /// 价格单位描述
        /// </summary>
        public string price_desc { get; set; }
        /// <summary>
        /// 是否是升级商品: 0 不是, 1 是升级等级商品 
        /// </summary>
        public int is_upgrade { get; set; } = 0;
        /// <summary>
        /// 促销优惠
        /// </summary>
        public PromotionDto promotion { get; set; }
    }

    /// <summary>
    /// 商品详情dto
    /// </summary>
    public class GoodsDetailDto
    {
        public GoodsDetail detail { get; set; }
    }

    /// <summary>
    /// 商品完整信息
    /// </summary>
    public class GoodsDetail : Goods
    {
        ///// <summary>
        ///// 商品详情
        ///// </summary>
        //public string content { get; set; }
        /// <summary>
        /// 主图视频
        /// </summary>
        public string video { get; set; } = string.Empty;
        /// <summary>
        /// 主图视频封面
        /// </summary>
        public string videoCover { get; set; } = string.Empty;
        /// <summary>
        /// 是否是升级商品: 0 不是, 1 是升级等级商品 
        /// </summary>
        public int is_upgrade { get; set; } = 0;
        /// <summary>
        /// 商品轮播图
        /// </summary>
        public List<GoodsImage> goods_images { get; set; }
        
        /// <summary>
        /// 规格列表
        /// </summary>
        public List<Spec> specList { get; set; }
        /// <summary>
        /// SKU列表
        /// </summary>
        public List<GoodsSkuDto> skuList { get; set; }
        /// <summary>
        /// 促销优惠
        /// </summary>
        public PromotionDto promotion { get; set; }
    }

}